package ahxu.test;

import java.net.URI;
import java.net.URISyntaxException;

import ahxu.AhxuServiceProvider;
import ahxu.crawler.CrawlerManager;
import ahxu.crawler.CrawlerSite;
import ahxu.crawler.UriInput;

public class Main {

	/**
	 * @param args
	 * @throws URISyntaxException 
	 */
	public static void main(String[] args) throws URISyntaxException {
		CrawlerManager m=AhxuServiceProvider.getInstance().getCrawlServiceProvider().getCrawlerManager();
		URI uri1=new URI("http://www.sina.com.cn");
		CrawlerSite site1=new CrawlerSite();
		site1.setLimitSamePath(true);
		//site1.setTotal(10);
		UriInput i1=new UriInput();
		i1.setAnchorText("新浪新闻");
		i1.setUri(uri1);
		site1.setInput(i1);
//		for(int i=0;i<1;i++){
			
			m.putCrawlerSite(site1);
//	}
//	
	m.start();

	}

}
